using System;
using System.Windows.Forms;
using Outlook = Microsoft.Office.Interop.Outlook;
using System.Runtime.InteropServices;

namespace AttachChecker
{
	internal class OutlookWindow : IWin32Window
	{
		[DllImport("user32")]
		public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);

		public OutlookWindow(Outlook.Inspector activeInspector)
		{
			_hWnd = FindWindow("rctrl_renwnd32\0", activeInspector.Caption);
		}

		public IntPtr Handle
		{
			get { return _hWnd; }
		}

		private IntPtr _hWnd = IntPtr.Zero;
	}
}
